<!DOCTYPE html>
<html>
<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>评估问卷</title>
    <meta name="description" content="传智健康">
    <meta name="keywords" content="传智健康">
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <!-- 引入样式 -->
    <link rel="stylesheet" href="../plugins/elementui/index.css">
    <link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../css/style.css">
    <link rel="stylesheet" href="../css/page-health-riskQuestion.css"/>
    <link rel="icon" href="../img/asset-favico.ico">

    <link rel="stylesheet" href="../css/page-health-riskQuestion.css"/>
</head>
<body class="hold-transition">
<div class="app" id="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <a href="health-risk.html"><span class="f-left"><i class="icon-back"></i>返回</span></a>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="question">
            <div class="q-tit">
                <p class="type-num"><span><i class="cur-num">1</i>/<i class="total-num">31</i>[<i
                        class="type">单选</i>]</span></p>
                <p class="tit">1.头痛</p>
            </div>
            <div class="q-choose">
                <div class="choose-items">
                    <div class="input-row radio left">
                        <input id="item1" type="radio" name="item" value="1" checked>
                        <label for="item1"></label>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 没有(根本不)</span>
                    </div>
                    <div class="input-row radio left">
                        <input id="item2" type="radio" name="item" value="2">
                        <label for="item2"></label>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;很少（有一点）</span>
                    </div>
                    <div class="input-row radio left">
                        <input id="item3" type="radio" name="item" value="3">
                        <label for="item3"></label>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;有时（有些）</span>
                    </div>
                    <div class="input-row radio left">
                        <input id="item4" type="radio" name="item" value="4">
                        <label for="item4"></label>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;经常</span>
                    </div>
                    <div class="input-row radio left">
                        <input id="item5" type="radio" name="item" value="5">
                        <label for="item5"></label>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总是</span>
                    </div>
                </div>
                <div class="tool-btn">
                    <a class="btn next-btn" @click="find()">下一题</a>
                    <a class="btn cancle-btn">取消</a>
                </div>
            </div>
        </div>
    </div>
</div>

</body>

<script src="../js/vue.js"></script>
<script src="../plugins/elementui/index.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script src="../js/axios-0.18.0.js"></script>

<script>
    var vue = new Vue({
        el: '#app',
        methods: {
            find() {
                let value = $("input:checked").val();
                let id = $(".cur-num").html();
                axios.post("/psychoanalysisMobile/findById.do?id=" + id + "&value=" + value).then((res) => {

                    console.log(res)



                    if (res.data.data.id == 31) {
                        $(".tit").html(res.data.data.psychoanalysis_test);
                        $(".q-choose").hide();
                    } else {
                        $(".tit").html(res.data.data.psychoanalysis_test );
                        $(".cur-num").html(res.data.data.id);
                        $("#item1").prop("checked", true);
                    }
                })
            }
        },
    });
</script>
</html>